Integrand size = 33, antiderivative size = 64 \[ \int \frac {d+e x+f x^2+g x^3+h x^4}{4-5 x^2+x^4} \, dx=h x-\frac {1}{6} (d+4 f+16 h) \text {arctanh}\left (\frac {x}{2}\right )+\frac {1}{3} (d+f+h) \text {arctanh}(x)-\frac {1}{6} (e+g) \log \left (1-x^2\right )+\frac {1}{6} (e+4 g) \log \left (4-x^2\right ) \]
h*x-1/6*(d+4*f+16*h)*arctanh(1/2*x)+1/3*(d+f+h)*arctanh(x)-1/6*(e+g)*ln(-x ^2+1)+1/6*(e+4*g)*ln(-x^2+4)
Time = 0.03 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.27 \[ \int \frac {d+e x+f x^2+g x^3+h x^4}{4-5 x^2+x^4} \, dx=\frac {1}{12} (12 h x-2 (d+e+f+g+h) \log (1-x)+(d+2 (e+2 f+4 g+8 h)) \log (2-x)+2 (d-e+f-g+h) \log (1+x)-(d-2 e+4 f-8 g+16 h) \log (2+x)) \]
(12*h*x - 2*(d + e + f + g + h)*Log[1 - x] + (d + 2*(e + 2*f + 4*g + 8*h)) *Log[2 - x] + 2*(d - e + f - g + h)*Log[1 + x] - (d - 2*e + 4*f - 8*g + 16 *h)*Log[2 + x])/12
Time = 0.40 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.08, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {2202, 1576, 1141, 2009, 2205, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {d+e x+f x^2+g x^3+h x^4}{x^4-5 x^2+4} \, dx\) |
\(\Big \downarrow \) 2202 |
\(\displaystyle \int \frac {h x^4+f x^2+d}{x^4-5 x^2+4}dx+\int \frac {x \left (g x^2+e\right )}{x^4-5 x^2+4}dx\) |
\(\Big \downarrow \) 1576 |
\(\displaystyle \int \frac {h x^4+f x^2+d}{x^4-5 x^2+4}dx+\frac {1}{2} \int \frac {g x^2+e}{x^4-5 x^2+4}dx^2\) |
\(\Big \downarrow \) 1141 |
\(\displaystyle \int \frac {h x^4+f x^2+d}{x^4-5 x^2+4}dx+\frac {1}{2} \int \left (\frac {e+g}{3 \left (1-x^2\right )}-\frac {e+4 g}{3 \left (4-x^2\right )}\right )dx^2\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \int \frac {h x^4+f x^2+d}{x^4-5 x^2+4}dx+\frac {1}{2} \left (\frac {1}{3} (e+4 g) \log \left (4-x^2\right )-\frac {1}{3} (e+g) \log \left (1-x^2\right )\right )\) |
\(\Big \downarrow \) 2205 |
\(\displaystyle \int \left (h+\frac {(f+5 h) x^2+d-4 h}{x^4-5 x^2+4}\right )dx+\frac {1}{2} \left (\frac {1}{3} (e+4 g) \log \left (4-x^2\right )-\frac {1}{3} (e+g) \log \left (1-x^2\right )\right )\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {1}{6} \text {arctanh}\left (\frac {x}{2}\right ) (d+4 f+16 h)+\frac {1}{3} \text {arctanh}(x) (d+f+h)+\frac {1}{2} \left (\frac {1}{3} (e+4 g) \log \left (4-x^2\right )-\frac {1}{3} (e+g) \log \left (1-x^2\right )\right )+h x\) |
h*x - ((d + 4*f + 16*h)*ArcTanh[x/2])/6 + ((d + f + h)*ArcTanh[x])/3 + (-1 /3*((e + g)*Log[1 - x^2]) + ((e + 4*g)*Log[4 - x^2])/3)/2
3.1.13.3.1 Defintions of rubi rules used
Int[((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_ Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[1/c^p Int[ExpandIntegrand[ (d + e*x)^m*(b/2 - q/2 + c*x)^p*(b/2 + q/2 + c*x)^p, x], x], x] /; EqQ[p, - 1] || !FractionalPowerFactorQ[q]] /; FreeQ[{a, b, c, d, e}, x] && ILtQ[p, 0] && IntegerQ[m] && NiceSqrtQ[b^2 - 4*a*c]
Int[(x_)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^( p_.), x_Symbol] :> Simp[1/2 Subst[Int[(d + e*x)^q*(a + b*x + c*x^2)^p, x] , x, x^2], x] /; FreeQ[{a, b, c, d, e, p, q}, x]
Int[(Pn_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Module[{n = Expon[Pn, x], k}, Int[Sum[Coeff[Pn, x, 2*k]*x^(2*k), {k, 0, n/2}]*(a + b *x^2 + c*x^4)^p, x] + Int[x*Sum[Coeff[Pn, x, 2*k + 1]*x^(2*k), {k, 0, (n - 1)/2}]*(a + b*x^2 + c*x^4)^p, x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pn, x] && !PolyQ[Pn, x^2]
Int[(Px_)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> Int[ExpandInte grand[Px/(a + b*x^2 + c*x^4), x], x] /; FreeQ[{a, b, c}, x] && PolyQ[Px, x^ 2] && Expon[Px, x^2] > 1
Time = 0.08 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.39
method | result | size |
default | \(h x +\left (-\frac {d}{12}+\frac {e}{6}-\frac {f}{3}+\frac {2 g}{3}-\frac {4 h}{3}\right ) \ln \left (x +2\right )+\left (\frac {d}{6}-\frac {e}{6}+\frac {f}{6}-\frac {g}{6}+\frac {h}{6}\right ) \ln \left (x +1\right )+\left (-\frac {d}{6}-\frac {e}{6}-\frac {f}{6}-\frac {g}{6}-\frac {h}{6}\right ) \ln \left (x -1\right )+\left (\frac {d}{12}+\frac {e}{6}+\frac {f}{3}+\frac {2 g}{3}+\frac {4 h}{3}\right ) \ln \left (x -2\right )\) | \(89\) |
norman | \(h x +\left (-\frac {d}{12}+\frac {e}{6}-\frac {f}{3}+\frac {2 g}{3}-\frac {4 h}{3}\right ) \ln \left (x +2\right )+\left (\frac {d}{6}-\frac {e}{6}+\frac {f}{6}-\frac {g}{6}+\frac {h}{6}\right ) \ln \left (x +1\right )+\left (-\frac {d}{6}-\frac {e}{6}-\frac {f}{6}-\frac {g}{6}-\frac {h}{6}\right ) \ln \left (x -1\right )+\left (\frac {d}{12}+\frac {e}{6}+\frac {f}{3}+\frac {2 g}{3}+\frac {4 h}{3}\right ) \ln \left (x -2\right )\) | \(89\) |
parallelrisch | \(h x +\frac {\ln \left (x -2\right ) d}{12}+\frac {\ln \left (x -2\right ) e}{6}+\frac {\ln \left (x -2\right ) f}{3}+\frac {2 \ln \left (x -2\right ) g}{3}+\frac {4 \ln \left (x -2\right ) h}{3}-\frac {\ln \left (x -1\right ) d}{6}-\frac {\ln \left (x -1\right ) e}{6}-\frac {\ln \left (x -1\right ) f}{6}-\frac {\ln \left (x -1\right ) g}{6}-\frac {\ln \left (x -1\right ) h}{6}+\frac {\ln \left (x +1\right ) d}{6}-\frac {\ln \left (x +1\right ) e}{6}+\frac {\ln \left (x +1\right ) f}{6}-\frac {\ln \left (x +1\right ) g}{6}+\frac {\ln \left (x +1\right ) h}{6}-\frac {\ln \left (x +2\right ) d}{12}+\frac {\ln \left (x +2\right ) e}{6}-\frac {\ln \left (x +2\right ) f}{3}+\frac {2 \ln \left (x +2\right ) g}{3}-\frac {4 \ln \left (x +2\right ) h}{3}\) | \(145\) |
risch | \(h x -\frac {\ln \left (1-x \right ) d}{6}-\frac {\ln \left (1-x \right ) e}{6}-\frac {\ln \left (1-x \right ) f}{6}-\frac {\ln \left (1-x \right ) g}{6}-\frac {\ln \left (1-x \right ) h}{6}+\frac {\ln \left (2-x \right ) d}{12}+\frac {\ln \left (2-x \right ) e}{6}+\frac {\ln \left (2-x \right ) f}{3}+\frac {2 \ln \left (2-x \right ) g}{3}+\frac {4 \ln \left (2-x \right ) h}{3}+\frac {\ln \left (x +1\right ) d}{6}-\frac {\ln \left (x +1\right ) e}{6}+\frac {\ln \left (x +1\right ) f}{6}-\frac {\ln \left (x +1\right ) g}{6}+\frac {\ln \left (x +1\right ) h}{6}-\frac {\ln \left (x +2\right ) d}{12}+\frac {\ln \left (x +2\right ) e}{6}-\frac {\ln \left (x +2\right ) f}{3}+\frac {2 \ln \left (x +2\right ) g}{3}-\frac {4 \ln \left (x +2\right ) h}{3}\) | \(165\) |
h*x+(-1/12*d+1/6*e-1/3*f+2/3*g-4/3*h)*ln(x+2)+(1/6*d-1/6*e+1/6*f-1/6*g+1/6 *h)*ln(x+1)+(-1/6*d-1/6*e-1/6*f-1/6*g-1/6*h)*ln(x-1)+(1/12*d+1/6*e+1/3*f+2 /3*g+4/3*h)*ln(x-2)
Time = 1.14 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.12 \[ \int \frac {d+e x+f x^2+g x^3+h x^4}{4-5 x^2+x^4} \, dx=h x - \frac {1}{12} \, {\left (d - 2 \, e + 4 \, f - 8 \, g + 16 \, h\right )} \log \left (x + 2\right ) + \frac {1}{6} \, {\left (d - e + f - g + h\right )} \log \left (x + 1\right ) - \frac {1}{6} \, {\left (d + e + f + g + h\right )} \log \left (x - 1\right ) + \frac {1}{12} \, {\left (d + 2 \, e + 4 \, f + 8 \, g + 16 \, h\right )} \log \left (x - 2\right ) \]
h*x - 1/12*(d - 2*e + 4*f - 8*g + 16*h)*log(x + 2) + 1/6*(d - e + f - g + h)*log(x + 1) - 1/6*(d + e + f + g + h)*log(x - 1) + 1/12*(d + 2*e + 4*f + 8*g + 16*h)*log(x - 2)
Timed out. \[ \int \frac {d+e x+f x^2+g x^3+h x^4}{4-5 x^2+x^4} \, dx=\text {Timed out} \]
Time = 0.20 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.12 \[ \int \frac {d+e x+f x^2+g x^3+h x^4}{4-5 x^2+x^4} \, dx=h x - \frac {1}{12} \, {\left (d - 2 \, e + 4 \, f - 8 \, g + 16 \, h\right )} \log \left (x + 2\right ) + \frac {1}{6} \, {\left (d - e + f - g + h\right )} \log \left (x + 1\right ) - \frac {1}{6} \, {\left (d + e + f + g + h\right )} \log \left (x - 1\right ) + \frac {1}{12} \, {\left (d + 2 \, e + 4 \, f + 8 \, g + 16 \, h\right )} \log \left (x - 2\right ) \]
h*x - 1/12*(d - 2*e + 4*f - 8*g + 16*h)*log(x + 2) + 1/6*(d - e + f - g + h)*log(x + 1) - 1/6*(d + e + f + g + h)*log(x - 1) + 1/12*(d + 2*e + 4*f + 8*g + 16*h)*log(x - 2)
Time = 0.31 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.19 \[ \int \frac {d+e x+f x^2+g x^3+h x^4}{4-5 x^2+x^4} \, dx=h x - \frac {1}{12} \, {\left (d - 2 \, e + 4 \, f - 8 \, g + 16 \, h\right )} \log \left ({\left | x + 2 \right |}\right ) + \frac {1}{6} \, {\left (d - e + f - g + h\right )} \log \left ({\left | x + 1 \right |}\right ) - \frac {1}{6} \, {\left (d + e + f + g + h\right )} \log \left ({\left | x - 1 \right |}\right ) + \frac {1}{12} \, {\left (d + 2 \, e + 4 \, f + 8 \, g + 16 \, h\right )} \log \left ({\left | x - 2 \right |}\right ) \]
h*x - 1/12*(d - 2*e + 4*f - 8*g + 16*h)*log(abs(x + 2)) + 1/6*(d - e + f - g + h)*log(abs(x + 1)) - 1/6*(d + e + f + g + h)*log(abs(x - 1)) + 1/12*( d + 2*e + 4*f + 8*g + 16*h)*log(abs(x - 2))
Time = 7.90 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.41 \[ \int \frac {d+e x+f x^2+g x^3+h x^4}{4-5 x^2+x^4} \, dx=h\,x-\ln \left (x-1\right )\,\left (\frac {d}{6}+\frac {e}{6}+\frac {f}{6}+\frac {g}{6}+\frac {h}{6}\right )+\ln \left (x+1\right )\,\left (\frac {d}{6}-\frac {e}{6}+\frac {f}{6}-\frac {g}{6}+\frac {h}{6}\right )+\ln \left (x-2\right )\,\left (\frac {d}{12}+\frac {e}{6}+\frac {f}{3}+\frac {2\,g}{3}+\frac {4\,h}{3}\right )-\ln \left (x+2\right )\,\left (\frac {d}{12}-\frac {e}{6}+\frac {f}{3}-\frac {2\,g}{3}+\frac {4\,h}{3}\right ) \]